VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "clsTree"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

Public Function GetAllChildNode_Key(ByVal nNode As Node) As String
    Dim szReturn As String
    szReturn = ""
    szReturn = nNode.Key & ","
    GetAllChildNode_KeyEx nNode, szReturn
    szReturn = Left$(szReturn, Len(szReturn) - 1)
    
    szReturn = Replace$(szReturn, "F", "")
    GetAllChildNode_Key = szReturn
End Function

Private Function GetAllChildNode_KeyEx(ByVal nNode As Node, ByRef vStr As String) As String
    Dim nNodeChild As Node
    Set nNodeChild = nNode.Child
    
    Do While Not (nNodeChild Is Nothing)
        vStr = vStr & nNodeChild.Key & ","
        GetAllChildNode_KeyEx nNodeChild, vStr
        Set nNodeChild = nNodeChild.Next
    Loop

End Function

Public Function GetAllChildNode_Caption(ByVal nNode As Node) As String
    Dim szReturn As String
    szReturn = ""
    szReturn = nNode.Text & ","
    GetAllChildNode_CaptionEx nNode, szReturn
    szReturn = Left$(szReturn, Len(szReturn) - 1)
    
    
    GetAllChildNode_Caption = szReturn
End Function

Private Function GetAllChildNode_CaptionEx(ByVal nNode As Node, ByRef vStr As String) As String
    Dim nNodeChild As Node
    Set nNodeChild = nNode.Child
    
    Do While Not (nNodeChild Is Nothing)
        vStr = vStr & nNodeChild.Text & ","
        GetAllChildNode_CaptionEx nNodeChild, vStr
        Set nNodeChild = nNodeChild.Next
    Loop

End Function
